import React from 'react'
import { Text, View } from 'react-native'

const Divide = function (props) {
  let {
    width = '100%',
    height = 1,
    backgroundColor = 'red',
    isBig = false
  } = props
  // console.log(arguments);
  // console.log(props);
  // console.log(width, height, backgroundColor);

  if (isBig) {
    height = 'auto'
    backgroundColor = '#56da7c'
  }
  return (
    <View
      style={{
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        height: height,
        width: width,
        backgroundColor: backgroundColor,
        borderRadius: isBig ? 50 : 0,
        overflow: 'hidden',
        flexWrap: 'nowrap'
      }}>
      {isBig && (
        <View
          style={{
            height: 20,
            width: '50%',
            alignSelf: 'center',
            backgroundColor: '#6d0f7d',
            borderRadius: 10
          }}>
          <Text style={{ fontSize: 16, color: '#ffffff', textAlign: 'center' }}>
            ======大类的分割+++++++
          </Text>
        </View>
      )}
      {props.children}
    </View>
  )
}
export default Divide
